﻿//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Workflow
//  File name:	WorkflowActionRulesInstance.cs
//  Developer:	Solomatov Igor
//  Created:	16.04.2012
// 
//  -------------------- iSharePoint -------------------- //

using Smart.Common.Rules;

namespace Smart.Workflow.Rules
{
	/// <summary>
	/// Workflow action rules instance
	/// </summary>
	public class WorkflowActionRulesInstance : IRulesInstance
	{
		/// <summary>
		/// Workflow service
		/// </summary>
		public IWorkflowService Service { get; set; }

		/// <summary>
		/// Workflow action rules
		/// </summary>
		public ActionRuleInstanceList ActionRules { get; set; }

		/// <summary>
		/// Workflow activity instance
		/// </summary>
		public ActivityInstance Instance { get; set; }

		/// <summary>
		/// Instance rules
		/// </summary>
		public object Rules
		{
			get { return ActionRules; }
		}

		/// <summary>
		/// Workflow action rules instance
		/// </summary>
		public WorkflowActionRulesInstance(IWorkflowService service, ActionRuleInstanceList actionRules, ActivityInstance instance)
		{
			Service = service;
			ActionRules = actionRules;
			Instance = instance;
		}
	}
}